# central settings
'''
11144422

'''


#
simulation     = True
year           = "2012"
magnetPolarity = "Down"
###


########################################################################
from os import environ
import GaudiKernel.SystemOfUnits as Units 
from Gaudi.Configuration import *
#from Hlt.Configuration import *
from Configurables import (GaudiSequencer,
                           DecayTreeTuple,
                           CombineParticles,
                           LoKi__Hybrid__TupleTool,
                           DaVinci,
                           FilterDesktop)

from Configurables import LoKi__Hybrid__PlotTool as PlotTool 
from Configurables import LoKi__Hybrid__FilterCriterion as LoKiFilterCriterion
from DecayTreeTuple.Configuration import *

from GaudiConfUtils.ConfigurableGenerators import  CombineParticles
from PhysSelPython.Wrappers import (SelectionSequence, Selection, DataOnDemand, AutomaticData, MergedSelection)
from Configurables import LoKi__VoidFilter as Filter 
from PhysConf.Filters import LoKi_Filters
LoKiTool = LoKi__Hybrid__TupleTool( 'LoKiTool')
#
######################################################################################################

if simulation is True: 
    location = 'AllStreams/Phys/FullDSTDiMuonJpsi2MuMuDetachedLine/Particles'
if simulation is False: 
    location = 'Dimuon/Phys/FullDSTDiMuonJpsi2MuMuDetachedLine/Particles'
######################################################################################################
# if you are setting something wrong, it should die here...
if year not in [ "2011", "2012" ]:
    raise RuntimeError(year + " is not a valid year")
if magnetPolarity not in ["Up", "Down"]:
    raise RuntimeError(magnetPolarity + " is not a valid magnet polarity")
######################################################################################################
# CUTS CUTS CUTS CUTS CUTS CUTS CUTS
####################################
BdCombCuts = "(AM > 4500 * MeV) & "\
            "(AM < 7100 * MeV)" 
BdCuts = "(M                                   > 4600 * MeV) & "\
    "(M                                   < 7000 * MeV) & "\
    "(BPVIPCHI2()                         < 16) & "\
    "(BPVDIRA                             > 0.9995) & "\
    "(BPVVDCHI2                           > 64) & "\
    "(MAXTREE(ISBASIC,MIPCHI2DV(PRIMARY)) > 9 ) & "\
    "(VFASPF(VCHI2/VDOF)                  < 10)"

MuonCuts = "(TRGHP < 0.5) & "\
          "(MIPCHI2DV(PRIMARY) > 9) & "\
          "(PIDmu> 0) & "\
          "(ISMUON)"
PionCuts = "(TRGHP < 0.5) & "\
    "(MIPCHI2DV(PRIMARY) > 6.0) & "\
    "(HASRICH) & "\
    "(PIDK < 5)"\

Pi0Cuts = "(PT > 300) &"\
    "(CL > 0.02)"

OmegaCuts = "(PT > 800) & "\
    "(DMASS('omega(782)') < 400*MeV)"
#######################################################################################################
def __Pions__(PionCuts):
    """
    Filter pions from StdLoosePions
    """  
    _pions = AutomaticData(Location = 'Phys/StdAllLoosePions/Particles')
    _filter = FilterDesktop("PionFilter", Code = PionCuts)
    _sel = Selection("Selection_StdAllLoosePions",
                     RequiredSelections = [ _pions ] ,
                     Algorithm = _filter)
    return _sel
###
def __Pi0__(Pi0Cuts):
    """
    Filter Pi0 from Std Pi0
    """  
    _pi0resolved = AutomaticData(Location = 'Phys/StdLooseResolvedPi0/Particles')
    _pi0merged = AutomaticData(Location = 'Phys/StdLooseMergedPi0/Particles')
    _filter_pi0resolved = FilterDesktop("ResolvedPi0Filter", Code = Pi0Cuts )
    _filter_pi0merged = FilterDesktop("MergedPi0Filter", Code = Pi0Cuts  )        
    _selpi0resolved = Selection("Selection_pi0resolved",
                                RequiredSelections = [ _pi0resolved ] ,
                                Algorithm = _filter_pi0resolved)
    _selpi0merged = Selection("Selection_pi0merged",
                              RequiredSelections = [ _pi0merged ] ,
                              Algorithm = _filter_pi0merged)
    _sel = MergedSelection("Selection_pi0",
                           RequiredSelections = [ _selpi0resolved,_selpi0merged ])
    return _sel
###
def __Omega2PiPiPi0__(Pions, Pi0, RhoCuts):
    """
    Make omega(782) -> pi+ pi- pi0
    """
    _omega2pipipizero = CombineParticles()
    _omega2pipipizero.DecayDescriptor = "[omega(782) -> pi+ pi- pi0]cc"
    _omega2pipipizero.MotherCut = OmegaCuts
    
    _omegaConf = _omega2pipipizero.configurable("Combine_PiPiPi0")
    
    _selOMEGA2PIPIPIZERO = Selection( "Selection_omega2pipipizero",
                                  Algorithm = _omegaConf,
                                  RequiredSelections = [ Pions, Pi0 ] )
    return _selOMEGA2PIPIPIZERO
###
def __jpsi__(location):
    """
    Get the J/psi from the stripping line.
    Note the different location for data and MC
    """
    return AutomaticData(Location = location)
###
def __jpsiomega__(Jpsi, Omega, BdCombCuts, BdCuts):
    _jpsiomega = CombineParticles()
    _jpsiomega.DecayDescriptor = "[B -> J/psi(1S) omega(782)]cc"
    _jpsiomega.CombinationCut = BdCombCuts
    _jpsiomega.MotherCut = BdCuts
    _jpsiomegaConf = _jpsiomega.configurable("Combine_BJpsiomega")

    _selJpsiOmega = Selection("BJpsiOmega", 
                              Algorithm = _jpsiomegaConf, 
                              RequiredSelections = [ Jpsi, Omega])
                                
    return _selJpsiOmega
#######
Pions           = __Pions__(PionCuts)
Pi0             = __Pi0__(Pi0Cuts)
Omega           = __Omega2PiPiPi0__(Pions, Pi0, OmegaCuts)
Jpsi            = __jpsi__(location)
JpsiOmega   = __jpsiomega__(Jpsi,Omega, BdCombCuts, BdCuts)
###
BJpsiOmegaSeq = SelectionSequence( 'BJpsiOmegaSeq', TopSelection = JpsiOmega )
######################################################################################################
BJpsiOmega1 = DecayTreeTuple("BJpsiOmegaTuple1")
BJpsiOmega2 = DecayTreeTuple("BJpsiOmegaTuple2")

# input locations
BJpsiOmega1.Inputs = [ JpsiOmega.outputLocation() ]
BJpsiOmega2.Inputs = [ JpsiOmega.outputLocation() ]

# decay descriptors
# first is for resolved pi0
# second is for merged pi0
BJpsiOmega1.Decay = "[B0 -> ^(J/psi(1S) -> ^mu- ^mu+) ^(omega(782) -> ^pi+ ^pi- ^(pi0 -> ^gamma ^gamma))]CC"
BJpsiOmega2.Decay = "[B0 -> ^(J/psi(1S) -> ^mu- ^mu+) ^(omega(782) -> ^pi+ ^pi- ^<pi0>)]CC"

# define the tools and configure them
BJpsiOmega1.ToolList = [
    "TupleToolKinematic"
    ,"TupleToolPid"
    ,"TupleToolANNPID"
    ,"TupleToolTrackInfo"
    ,"TupleToolRecoStats"
    #,"TupleToolTrigger"
    ,"TupleToolPrimaries"
    ]



# define the list of triggers that could have fired...
triggerList = [ "L0HadronDecision", 
                "L0DiMuonDecision", 
                "L0MuonDecision", 
                "Hlt1TrackMuonDecision", 
                "Hlt1TrackAllL0Decision", 
                "Hlt1DiMuonLowMassDecision", 
                "Hlt1DiMuonHighMassDecision", 
                "Hlt1SingleMuonHighPTDecision", 
                "Hlt2Topo2BodySimpleDecision",
                "Hlt2Topo3BodySimpleDecision",
                "Hlt2Topo4BodySimpleDecision",
                "Hlt2Topo2BodyBBDTDecision",
                "Hlt2Topo3BodyBBDTDecision",
                "Hlt2Topo4BodyBBDTDecision",
                "Hlt2TopoMu2BodyBBDTDecision",
                "Hlt2TopoMu3BodyBBDTDecision",
                "Hlt2TopoMu4BodyBBDTDecision",
                "Hlt2TopoE2BodyBBDTDecision",
                "Hlt2TopoE3BodyBBDTDecision",
                "Hlt2TopoE4BodyBBDTDecision",
                "Hlt2DiMuonDetachedHeavyDecision", 
                "Hlt2SingleMuonDecision", 
                "Hlt2DiMuonDetachedDecision", 
                "Hlt2DiMuonDetachedJPsiDecision", 
                "Hlt2DiMuonDetachedHeavyDecision" ]

# other variables
# including isolation variables
# for microDST, they are stored under a special location
BJpsiOmega1.addTupleTool("LoKi::Hybrid::TupleTool/LoKiTool")
BJpsiOmega1.LoKiTool.Variables = {
    "eta"                     : "ETA",
    "phi"                     : "PHI",
    "LV01"                    : "LV01",
    "BPVDLS"                  : "BPVDLS" }



# some truthmatching stuff
if simulation is True:
    MCTruth1=BJpsiOmega1.addTupleTool("TupleToolMCTruth/MCTruth1")
    MCTruth1.addTupleTool("MCTupleToolHierarchy")
    MCTruth2=BJpsiOmega2.addTupleTool("TupleToolMCTruth/MCTruth2")
    MCTruth2.addTupleTool("MCTupleToolHierarchy")


####
# end of configuration for all particles
BJpsiOmega2.ToolList = BJpsiOmega1.ToolList
####

################################################################
################################################################
# define the branches for resolved pi0
# for resolved pi0
BJpsiOmega1.addBranches({  # remove all "^" except where needed.
        "B"          : "^([B0 -> (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi- ( pi0 ->  gamma  gamma))]CC)",
        "muplus"     : "  [B0 -> (J/psi(1S) ->  mu- ^mu+) ( omega(782) ->  pi+ pi- ( pi0 ->  gamma  gamma))]CC",
        "muminus"    : "  [B0 -> (J/psi(1S) -> ^mu-  mu+) ( omega(782) ->  pi+ pi- ( pi0 ->  gamma  gamma))]CC",
        "omega"      : "  [B0 -> (J/psi(1S) ->  mu-  mu+) ^(omega(782) ->  pi+ pi- ( pi0 ->  gamma  gamma))]CC",
        "piplus"     : "  [B0 -> (J/psi(1S) ->  mu-  mu+) ( omega(782) -> ^pi+ pi- ( pi0 ->  gamma  gamma))]CC",
        "piminus"    : "  [B0 -> (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ ^pi- ( pi0 ->  gamma  gamma))]CC",
        "Jpsi"       : "  [B0 -> ^(J/psi(1S) -> mu-  mu+) ( omega(782) ->  pi+ pi- ( pi0 ->  gamma  gamma))]CC",
        "pi0Resolved": "  [B0 -> (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi- ^(pi0 ->  gamma  gamma))]CC",
        "gamma1"     : "  [B0 -> (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi- ( pi0 -> ^gamma  gamma))]CC",
        "gamma2"     : "  [B0 -> (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi- ( pi0 ->  gamma ^gamma))]CC"
        })

### B tools
BJpsiOmega1.B.addTupleTool("TupleToolDecayTreeFitter/BDTF")
BJpsiOmega1.B.BDTF.constrainToOriginVertex = True
BJpsiOmega1.B.BDTF.daughtersToConstrain = [ 'J/psi(1S)', 'pi0' ]
BJpsiOmega1.B.addTupleTool("TupleToolGeometry")
BJpsiOmega1.B.addTupleTool("TupleToolPropertime")

BJpsiOmega1.B.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega1.B.TupleToolTISTOS.TriggerList = triggerList#前面定义
BJpsiOmega1.B.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega1.B.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega1.B.TupleToolTISTOS.VerboseHlt2 = True

BJpsiOmega1.B.addTupleTool("TupleToolVtxIsoln")
BJpsiOmega1.B.addTupleTool("TupleToolConeIsolation/TupleToolConeIsolation")
BJpsiOmega1.B.TupleToolConeIsolation.Verbose = True
BJpsiOmega1.B.TupleToolConeIsolation.MinConeSize = 0.6
BJpsiOmega1.B.TupleToolConeIsolation.MaxConeSize = 2.0
BJpsiOmega1.B.TupleToolConeIsolation.SizeStep = 0.3

### omega tools
BJpsiOmega1.omega.addTupleTool("TupleToolDecayTreeFitter/omegaDTF")
BJpsiOmega1.omega.omegaDTF.constrainToOriginVertex = False
BJpsiOmega1.omega.omegaDTF.daughtersToConstrain = [ 'pi0' ]
BJpsiOmega1.omega.addTupleTool("TupleToolGeometry")
BJpsiOmega1.omega.addTupleTool("TupleToolConeIsolation/TupleToolConeIsolation")
BJpsiOmega1.omega.TupleToolConeIsolation.Verbose = True
BJpsiOmega1.omega.TupleToolConeIsolation.MinConeSize = 0.6
BJpsiOmega1.omega.TupleToolConeIsolation.MaxConeSize = 2.0
BJpsiOmega1.omega.TupleToolConeIsolation.SizeStep = 0.3

### Jpsi tools
BJpsiOmega1.Jpsi.addTupleTool("TupleToolGeometry")
BJpsiOmega1.Jpsi.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega1.Jpsi.TupleToolTISTOS.TriggerList = triggerList 
BJpsiOmega1.Jpsi.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega1.Jpsi.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega1.Jpsi.TupleToolTISTOS.VerboseHlt2 = True

# muplus tools
BJpsiOmega1.muplus.addTupleTool("TupleToolGeometry")
BJpsiOmega1.muplus.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega1.muplus.TupleToolTISTOS.TriggerList = triggerList
BJpsiOmega1.muplus.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega1.muplus.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega1.muplus.TupleToolTISTOS.VerboseHlt2 = True

# muminus tools
BJpsiOmega1.muminus.addTupleTool("TupleToolGeometry")
BJpsiOmega1.muminus.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega1.muminus.TupleToolTISTOS.TriggerList = triggerList
BJpsiOmega1.muminus.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega1.muminus.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega1.muminus.TupleToolTISTOS.VerboseHlt2 = True

# piplus tools
BJpsiOmega1.piplus.addTupleTool("TupleToolGeometry")

# piminus tools
BJpsiOmega1.piminus.addTupleTool("TupleToolGeometry")

# resolved pi0 tools
BJpsiOmega1.pi0Resolved.addTupleTool("TupleToolPi0Info")
#BJpsiOmega1.pi0Resolved.addTupleTool("TupleToolVeto/veto")
#BJpsiOmega1.pi0Resolved.veto.Particle = "pi0"
#BJpsiOmega1.pi0Resolved.veto.VetoOther["Pi0R"]=["Phys/StdLooseResolvedPi0/Particles"]
#BJpsiOmega1.pi0Resolved.veto.OutputLevel = 3

# gamma tools
BJpsiOmega1.gamma1.addTupleTool("TupleToolPhotonInfo")
BJpsiOmega1.gamma1.addTupleTool("TupleToolCaloHypo")

# gamma tools
BJpsiOmega1.gamma2.addTupleTool("TupleToolPhotonInfo")
BJpsiOmega1.gamma2.addTupleTool("TupleToolCaloHypo")

################################################################
################################################################
# define the branches for merged pi0
#
BJpsiOmega2.addBranches({  # remove all "^" except where needed.
        "B"    : "^([B0 ->  (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi-   pi0) ]CC)",
        "muplus"   : "  [B0 ->  (J/psi(1S) ->  mu- ^mu+) ( omega(782) ->  pi+ pi-   pi0) ]CC",
        "muminus"  : "  [B0 ->  (J/psi(1S) -> ^mu-  mu+) ( omega(782) ->  pi+ pi-   pi0) ]CC",
        "omega"    : "  [B0 ->  (J/psi(1S) ->  mu-  mu+) ^(omega(782) ->  pi+ pi-   pi0) ]CC",
        "piplus"   : "  [B0 ->  (J/psi(1S) ->  mu-  mu+) ( omega(782) -> ^pi+ pi-   pi0) ]CC",
        "piminus"  : "  [B0 ->  (J/psi(1S) ->  mu-  mu+) ( omega(782) -> pi+ ^pi-   pi0) ]CC",
        "Jpsi"     : "  [B0 -> ^(J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi-   pi0) ]CC",
        "pi0Merged": "  [B0 ->  (J/psi(1S) ->  mu-  mu+) ( omega(782) ->  pi+ pi- ^<pi0>)]CC"
        })

### B tools
BJpsiOmega2.B.addTupleTool("TupleToolDecayTreeFitter/BDTF")
BJpsiOmega2.B.BDTF.constrainToOriginVertex = True
BJpsiOmega2.B.BDTF.daughtersToConstrain = [ 'J/psi(1S)', 'pi0' ]
BJpsiOmega2.B.addTupleTool("TupleToolGeometry")
BJpsiOmega2.B.addTupleTool("TupleToolPropertime")
BJpsiOmega2.B.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega2.B.TupleToolTISTOS.TriggerList = triggerList 
BJpsiOmega2.B.addTupleTool("TupleToolVtxIsoln")
BJpsiOmega2.B.addTupleTool( "TupleToolConeIsolation/TupleToolConeIsolation" )
BJpsiOmega2.B.TupleToolConeIsolation.Verbose = True
BJpsiOmega2.B.TupleToolConeIsolation.MinConeSize = 0.6
BJpsiOmega2.B.TupleToolConeIsolation.MaxConeSize = 2.0
BJpsiOmega2.B.TupleToolConeIsolation.SizeStep = 0.3

### omega tools
BJpsiOmega2.omega.addTupleTool("TupleToolDecayTreeFitter/omegaDTF")
BJpsiOmega2.omega.omegaDTF.constrainToOriginVertex = False
BJpsiOmega2.omega.omegaDTF.daughtersToConstrain = [ 'pi0' ]
BJpsiOmega2.omega.addTupleTool("TupleToolGeometry")
BJpsiOmega2.omega.addTupleTool("TupleToolConeIsolation/TupleToolConeIsolation")
BJpsiOmega2.omega.TupleToolConeIsolation.Verbose = True
BJpsiOmega2.omega.TupleToolConeIsolation.MinConeSize = 0.6
BJpsiOmega2.omega.TupleToolConeIsolation.MaxConeSize = 2.0
BJpsiOmega2.omega.TupleToolConeIsolation.SizeStep = 0.3

### Jpsi tools
BJpsiOmega2.Jpsi.addTupleTool("TupleToolGeometry")
BJpsiOmega2.Jpsi.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega2.Jpsi.TupleToolTISTOS.TriggerList = triggerList 
BJpsiOmega2.Jpsi.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega2.Jpsi.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega2.Jpsi.TupleToolTISTOS.VerboseHlt2 = True

# muplus tools
BJpsiOmega2.muplus.addTupleTool("TupleToolGeometry")
BJpsiOmega2.muplus.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega2.muplus.TupleToolTISTOS.TriggerList = triggerList
BJpsiOmega2.muplus.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega2.muplus.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega2.muplus.TupleToolTISTOS.VerboseHlt2 = True

# muminus tools
BJpsiOmega2.muminus.addTupleTool("TupleToolGeometry")
BJpsiOmega2.muminus.addTupleTool( "TupleToolTISTOS/TupleToolTISTOS")
BJpsiOmega2.muminus.TupleToolTISTOS.TriggerList = triggerList
BJpsiOmega2.muminus.TupleToolTISTOS.VerboseL0 = True
BJpsiOmega2.muminus.TupleToolTISTOS.VerboseHlt1 = True
BJpsiOmega2.muminus.TupleToolTISTOS.VerboseHlt2 = True

### piplus tools
BJpsiOmega2.piplus.addTupleTool("TupleToolGeometry")

# piplus tools
BJpsiOmega2.piminus.addTupleTool("TupleToolGeometry")

### merged pi0 tools
BJpsiOmega2.pi0Merged.addTupleTool("TupleToolPhotonInfo")
BJpsiOmega2.pi0Merged.addTupleTool("TupleToolPi0Info")
BJpsiOmega2.pi0Merged.addTupleTool("TupleToolCaloHypo")
#BJpsiOmega2.pi0Merged.addTupleTool("TupleToolProtoPData/protoData")
#BJpsiOmega2.pi0Merged.protoData.DataList = [ "IsNotE","IsNotH" ]

################################################################
################################################################
Seq1 = GaudiSequencer("Seq1")
Seq1.Members.append( BJpsiOmegaSeq.sequence() )
Seq1.Members.append( BJpsiOmega1 )
Seq1.Members.append( BJpsiOmega2 )
Seq1.ModeOR = True
Seq1.ShortCircuit = False
# ######################################################################################################
DaVinci().MainOptions = ""
DaVinci().UserAlgorithms = [Seq1]
# ######################################################################################################
stripFilter = LoKi_Filters (
    STRIP_Code = " HLT_PASS_RE ('StrippingFullDSTDiMuonJpsi2MuMuDetachedLineDecision') "
)
stripFilterSeq = stripFilter.sequence( "StripFilter" )
########################################################################
DaVinci().EvtMax    = -1
DaVinci().DataType  = year
DaVinci().PrintFreq = 1000
DaVinci().Lumi      = True
DaVinci().EventPreFilters = [ stripFilterSeq ]

DaVinci().InputType = "DST"

if simulation is True:
    DaVinci().Simulation = True
    DaVinci().Lumi       = False
    DaVinci().TupleFile  = "BJpsiOmega" + year + magnetPolarity + "MC.root"
    
if simulation is False: 
    DaVinci().TupleFile = "BJpsiOmega" + year + magnetPolarity + ".root"

# db tags                                                                                                                                             
if simulation is True:
    if year is "2011":
        if magnetPolarity is "Down":
            DaVinci().CondDBtag = "sim-20130522-vc-md100"
            DaVinci().DDDBtag   = "dddb-20130929"
        if magnetPolarity is "Up":
            DaVinci().CondDBtag = "sim-20130522-vc-mu100"
            DaVinci().DDDBtag   = "dddb-20130929"

    if year is "2012":
        if magnetPolarity is "Down":
            DaVinci().CondDBtag = "sim-20130522-1-vc-md100"
            DaVinci().DDDBtag   = "dddb-20130929-1"
        if magnetPolarity is "Up":
            DaVinci().CondDBtag = "sim-20130522-1-vc-mu100"
            DaVinci().DDDBtag   = "dddb-20130929-1"

### mag polarity does not matter                                                                                                                       
if simulation is False:
    if year is "2011":
        DaVinci().CondDBtag = "cond-20141107"
        DaVinci().DDDBtag   = "dddb-20130929"

    if year is "2012":
        DaVinci().CondDBtag = "sim-20130522-1-vc-md100"
        DaVinci().DDDBtag   = "dddb-20130929-1"


####################################################
# local files for testing go here
####################################################
from Gaudi.Configuration import *
from GaudiConf import IOHelper

IOHelper().inputFiles([
    './00046876_00000004_2.AllStreams.dst'
], clear=True)
